﻿@model Vacation.Models.Course

<h2>编辑条目</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm())
{
     @Html.ValidationSummary(true, "课程更新失败。请更正错误并重试。")
 <table width="100%" class="edit">
        <tr>
            <th>
                <div class="editor-label">
                    @Html.LabelFor(model => model.CourseNo)
                </div>
            </th>
            <td>
                <div class="editor-field">
                    @Html.DisplayFor(model => model.CourseNo)
                </div>
            </td>
        </tr>
        <tr>
            <th>
                <div class="editor-label">
                    @Html.LabelFor(model => model.Name)
                </div>
            </th>
            <td>
                <div class="editor-field">
                    @Html.TextBoxFor(model => model.Name)
                    @Html.ValidationMessageFor(model => model.Name)
                </div>
            </td>
        </tr>
        <tr>
            <th>
                <div class="editor-label">
                    @Html.LabelFor(model => model.School)
                </div>
            </th>
            <td>
                <div class="editor-field">
                    @Html.DisplayFor(model => model.School)
                </div>
            </td>
        </tr>
                <tr>
            <th>
                <div class="editor-label">
                    @Html.LabelFor(model => model.Teacher)
                </div>
            </th>
            <td>
                <div class="editor-field">
                    @Html.DisplayFor(model => model.Teacher)
                </div>
            </td>
        </tr>
                <tr>
            <th>
                <div class="editor-label">
                     @Html.LabelFor(model => model.Date)
                </div>
            </th>
            <td>
                <div class="editor-field">
                     @Html.DisplayFor(model => model.Date)
                </div>
            </td>
        </tr>
    </table>
    @Html.HiddenFor(model => model.Type);
    <p style="text-align:center">
        <input type="submit" value="提交更新" />
    </p>
}
<div>
    @Html.ActionLink("返回列表", "Index")
</div>
